﻿<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>RequestBridge</title>
    <script src="../../Scripts/jquery.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery.ba-postmessage.js" type="text/javascript"></script>
    <script>
        $(function () {
            $.receiveMessage(function (e) {
                $.ajax({
                    url: e.data,   //接收页面
                    type: 'post',      //POST方式发送数据
                    async: false,      //ajax同步
                    dataType: 'json',
                    success: function (e) {
                        $.postMessage("message:" + e.Info, '*', parent);
                    }
                });

            });
        });
    </script>
</head>
<body>
</body>
</html>
